﻿using Juli.Mes.Enums;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;
using Volo.Abp.Domain.Entities.Auditing;

namespace Juli.Mes.Plans
{
    public class Plan:FullAuditedEntity<Guid>
    {
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long PlanSerialNum { get; set; }

        public EnumPlanState State { get; set; }

        [Required]
        [Comment("熔炼号")]
        [MaxLength(MesConsts.MaxCodeLength)]
        public string SmeltNo { get; set; }

        [Required]
        [Comment("钢种")]
        [MaxLength(MesConsts.MaxNameLength)]
        public string SteelType { get; set; }

        /// <summary>
        /// 根据出钢温度 需要提前对钢包进行预热
        /// </summary>
        [Comment("出钢温度")]
        [Required]
        public double TappingTemperature { get; set; }

        [Comment("冶炼流程")]
        [MaxLength(MesConsts.MaxDesLength)]
        public string SmeltingProcess { get; set; }
 
        [Comment("特殊工艺要求")]
        [MaxLength(MesConsts.MaxDesLength)]
        public string SpecialProcessRequirement { get; set; }

        [Comment("计划开始时间")]
        public DateTime PlanStartTime { get; set; }

        [Comment("计划结束时间")]
        public DateTime PlanEndTime { get; set; }

        [Comment("实际开始时间")]
        public DateTime? RealStartTime { get; set; }

        [Comment("实际结束时间")]
        public DateTime? RealEndTime { get; set; }
    }
}
